package com.orderplus.opshop.synces.service.product;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.orderplus.opshop.synces.bean.ProductDetailModel;
import com.orderplus.opshop.synces.entity.product.ProductPropertyList;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Map;

/**
 * @author mhj
 * @date 2019-04-22 11:20:14
 */
public interface ProductPropertyListService extends IService<ProductPropertyList> {
	List<ProductDetailModel> mapFromProductPropertyListToProductDetailModel(Map<String, Object> map, String action, List<ProductDetailModel> productDetailModelList);

	ProductDetailModel.ProductProperty mapToProductProperty(Map<String, Object> productPropertyMap);

	ProductDetailModel.ProductProperty.PropsValue mapToPropsValue(Map<String, Object> productPropertyMap);

	ProductDetailModel.ProductProperty.PropsValue convertPropListIdsToMapObject(String propListIds, String action);

	List<ProductDetailModel.ProductProperty> convertMapToPropsList(List<Map<String, Object>> propertyListIdList, String action, ProductDetailModel.ProductProperty productProps);

	List<ProductDetailModel.ProductProperty.PropsValue> convertMapToPropsValue(List<Map<String, Object>> propValueMapList, String action)
			throws IllegalAccessException, InvocationTargetException, InstantiationException;

	IPage<Map<String, Object>> pageMap(Page<Map<String, Object>> page);

	List<ProductDetailModel> queryProductPropertyListToProductDetailModel(Map<String, Object> map, String action, List<ProductDetailModel> productDetailModelList)
			throws IllegalAccessException, InstantiationException, InvocationTargetException, IOException;

}